<%try{ %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="displayTag"%>
<%@ page import = "com.app.sgd.util.SessionConstants" %>
<%@ page import = "com.app.sgd.util.Constants" %>
<%@ page import = "java.util.*" %>

<%ArrayList lstTotal = (ArrayList)session.getAttribute(SessionConstants.LISTA_DOCUMENTOS_MOSTRAR); 
  if(lstTotal == null) lstTotal = new ArrayList();
%>

<html:html>
<script language="JavaScript" src="<%=request.getContextPath()%>/jscript/javascript.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/jscript/modal.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/jscript/validar.js"></script>

<script language="JavaScript" src="<%=request.getContextPath()%>/jscript/checksValida.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/jscript/documento_js.js"></script>

<script language="JavaScript">

</script>

<BODY>

<html:form styleId="form" action="Documento.do" method="post" scope="session">
	<input type="hidden" name="method" value=""/>
	<input type="hidden" name="index" value="-1"/>
	<html:hidden name="DocumentoForm" property="flgBusquedaAvanzada"/> 
	
<table id="tabla1" border=0 style="Z-INDEX:102;TOP:5px;top:0;" align="center" width="100%">
<tr>	
<td valign=top align=left>
	<TABLE align="center" width="100%">
		<TR>
		<TD align="center">
			<TABLE width="100%" class="search" cellspacing="0" cellpadding="0" align="center">
				<caption>DOCUMENTOS <bean:write name="DocumentoForm" property="tipoVista"/></caption>
	            <logic:match name="DocumentoForm" property="tipoVista" value="POR ENVIAR" > 
					<jsp:include page="/WEB-INF/pages/includes/busquedaPorEnviar.jsp" flush="true"/>
				</logic:match> 
	            <logic:match name="DocumentoForm" property="tipoVista" value="RECIBIDOS" > 
					<jsp:include page="/WEB-INF/pages/includes/busquedaRecibidos.jsp" flush="true"/>
				</logic:match>
	            <logic:match name="DocumentoForm" property="tipoVista" value="ENVIADOS" > 
					<jsp:include page="/WEB-INF/pages/includes/busquedaEnviados.jsp" flush="true"/>
				</logic:match> 
			</TABLE>
		</TD>
		</TR>
	</TABLE>
</td>
</tr>
<logic:notEmpty name="<%=SessionConstants.LISTA_DOCUMENTOS_MOSTRAR%>" scope="session">
<tr>
	<td align="right"><font face="Arial" size="2"><b><%=lstTotal.size()%> documento(s)</b></font>&nbsp;&nbsp;&nbsp;</td>
</tr>
</logic:notEmpty>
<tr>
<td>
	<logic:match name="DocumentoForm" property="tipoVista" value="POR ENVIAR" > 
		<jsp:include page="/WEB-INF/pages/documentos/documentos_por_enviar.jsp" flush="true"/>
	</logic:match> 
	<logic:match name="DocumentoForm" property="tipoVista" value="RECIBIDOS" > 
		<jsp:include page="/WEB-INF/pages/documentos/documentos_recibidos.jsp" flush="true"/>
	</logic:match>
	<logic:match name="DocumentoForm" property="tipoVista" value="ENVIADOS" > 
		<jsp:include page="/WEB-INF/pages/documentos/documentos_enviados.jsp" flush="true"/>
	</logic:match> 
</td>
</tr>
</table>

</html:form>

<iframe width=132 height=142 name="gToday:contrast:agenda.js"
	id="gToday:contrast:agenda.js" src="_commons/calendar/ipopeng.htm"
	scrolling="no" frameborder="0"
	style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>

<logic:equal name="DocumentoForm" property="flgBusquedaAvanzada" value="<%=Constants.VALOR_DEFAULT_UNO%>">
	<script language="javascript">
		displayBusqueda('divBusqueda',1);
	</script>
</logic:equal>

</BODY>
</html:html>
<%}catch(Exception e) {e.printStackTrace();}%>